﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel.Channels;

namespace NntpTransport
{
	/// <summary>
	/// Binding
	/// </summary>
	public class NntpTransportBinding : Binding
	{
		readonly MessageEncodingBindingElement _MessageElement;
		readonly NntpTransportBindingElement _TransportElement;

		public NntpTransportBinding()
		{
			this._MessageElement = new TextMessageEncodingBindingElement();
			this._TransportElement = new NntpTransportBindingElement();
		}

		public override BindingElementCollection CreateBindingElements()
		{
			BindingElementCollection Elements = new BindingElementCollection();
			Elements.Add(this._MessageElement);
			Elements.Add(this._TransportElement);
			return Elements.Clone();
		}

		public override string Scheme
		{
			get { return this._TransportElement.Scheme; }
		}
	}

}
